package com.cowcowit.springcloud.apis;

import com.cowcowit.springcloud.result.ResultData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author whboy
 * @create {YEAR}-{MONTH}-{DAY} {TIME}
 */
@FeignClient(value = "cloud-alibaba-seata-storage-service2002")
public interface StorageFeignApi {
    /**
     * 扣减库存
     */
    @PostMapping(value = "/springcloud/storage/decrease")
    ResultData decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
}